package factory;

import org.springframework.beans.factory.FactoryBean;

public class MyFactoryBean implements FactoryBean<UserServiceImplForFactory> {
    @Override
    public UserServiceImplForFactory getObject() throws Exception {
        return new UserServiceImplForFactory();
    }

    @Override
    public Class<?> getObjectType() {
        return UserServiceImplForFactory.class;
    }

    @Override
    public boolean isSingleton() {
        //这里是返回true是表示为单例
        return true;
    }
}
